package com.xpqh.ksg.modular.users.service;

import com.xpqh.ksg.common.persistence.dao.KsgUserNoticeMapper;
import com.xpqh.ksg.modular.users.dto.KsgUserNoticeRespDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class KsgUserNoticeService {
    @Autowired
    private KsgUserNoticeMapper ksgUserNoticeMapper;

    public List<KsgUserNoticeRespDTO> getNoticeList(Integer userId) {
        List<KsgUserNoticeRespDTO> noticeList = ksgUserNoticeMapper.getNoticeList(userId);
        ksgUserNoticeMapper.updateNoticeReadStatusByUserId(userId);
        return noticeList;
    }
}


